<?php

class Dashboard_model extends CI_Model {

    function __construct() {
        parent::__construct();
    }

    function getChapter_lastest($start = 0, $count = 6) {
        date_default_timezone_set('Asia/Ho_Chi_Minh');
        $end = strtotime('-3 day', strtotime('00:00:00'));
        $datas = $this->mongo_db->select(array('novelId', 'chapter', 'created'))
                        ->order_by(array("created" => "desc"))
                        ->limit($count, $start)
                        ->get('novel');
        return $datas;
    }
}